home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / unzip42.zip / MAKEFILE < prev    next >
Text File  |  1992-03-20  |  22KB  |  555 lines

  1. # ===========================================================================
  2. # Makefile for UnZip, ZipInfo & Ship:  Unix, OS/2 and MS-DOS (MSC NMAKE only)
  3. # Version:  no decrypt + (conditionally) inflate
  4. # ===========================================================================
  5. #
  6. #
  7. # INSTRUCTIONS (such as they are):
  8. #
  9. # "make vax"    -- makes UnZip on a VAX 11-780 BSD 4.3 in current directory
  10. #           (or a SysV VAX, or an 8600 running Ultrix, or...)
  11. # "make"    -- uses environment variable SYSTEM to set the type
  12. #           system to compile for.  This doesn't work for some
  13. #           particularly brain-damaged versions of make (VAX BSD,
  14. #           Gould, and SCO Unix are in this group).  If SYSTEM not
  15. #           set, gives instructions on what to try instead.
  16. # "make list"    -- lists all supported systems (targets), including ship
  17. #           and zipinfo targets
  18. # "make wombat" -- Chokes and dies if you haven't added the specifics
  19. #           for your Wombat 68000 (or whatever) to the systems list.
  20. #
  21. # CFLAGS are flags for the C compiler.  LDFLAGS are flags for the loader.
  22. # LDFLAGS2 are more flags for the loader, if they need to be at the end of
  23. # the line instead of at the beginning.
  24. #
  25. # My host (a VAX 11-780 running BSD 4.3) is hereafter referred to as "my host."
  26. #
  27. # My host's /usr/include/sys/param.h defines BSD for me.  You may have to add
  28. # "-DBSD" to the list of CFLAGS for your system.
  29. #
  30. # Some versions of make do not define the macro "$(MAKE)" (my host did not).
  31. # The makefile should now handle such systems correctly, more or less; the
  32. # possible exception to this is if you've used a make command-line option
  33. # (for example, the one which displays the commands which WOULD be executed,
  34. # but doesn't actually execute them).  It probably needs some more tinkering.
  35. # If things still don't work, use "make" instead of "$(MAKE)" in your system's
  36. # makerule.  Or try adding the following line to your .login file:
  37. #   setenv MAKE "make"
  38. # (It didn't help on my host.)
  39. #
  40. # memcpy and memset are provided for those systems that don't have them;
  41. # they're found in misc.c and will be used if -DZMEM is included in the list
  42. # of CFLAGS.  These days ALMOST all systems have them (they're mandated by
  43. # ANSI), but older systems might be lacking.  And at least ONE machine's
  44. # version results in some serious performance degradation...
  45. #
  46. # SCO Unix 3.2.0:  Don't use -Ox with cc (derived from Microsoft 5.1); there
  47. # is a bug in the loop optimization which causes bad CRC's.  [Onno van der
  48. # Linden]
  49. #
  50. # Be sure to test your nice new UnZip; successful compilation does not always
  51. # imply a working program.
  52.  
  53.  
  54. #####################
  55. # MACRO DEFINITIONS #
  56. #####################
  57.  
  58. # Defaults most systems use (use LOCAL_UNZIP in environment to add flags).
  59. # To add inflation:  uncomment INFL_OBJ below or add it to your environment
  60. # as appropriate, and add -DINFLATE to CFLAGS or to LOCAL_UNZIP.  (This
  61. # won't work if you don't have inflate.c, so don't be a goober...)
  62.  
  63. CC = cc
  64. CFLAGS = -O -DUNIX $(CR) $(LOCAL_UNZIP)
  65. ZC = -DZMEM
  66. LD = cc
  67. LDFLAGS = -o unzip
  68. LDFLAGS2 = -s
  69. ZL = -o zipinfo
  70. ZL2 = -s
  71. MV = mv
  72. EXE =
  73. O = .o
  74. #INFL_OBJ = inflate.o  -or-  inflate.obj  (pick one)
  75. OBJS = unzip$O extract$O file_io$O $(INFL_OBJ)\
  76.    mapname$O match$O misc$O unimplod$O unreduce$O unshrink$O
  77. OS2_OBJS = unzip.obj dosname.obj extract.obj file_io.obj $(INFL_OBJ)\
  78.    mapname.obj match.obj misc.obj unimplod.obj unreduce.obj unshrink.obj
  79. ZI_OBJS = zipinfo$O misc_$O match$O
  80.  
  81. SHELL = /bin/sh
  82.  
  83. # list of supported systems in this version
  84. SYSTEMS1 = 386i 3Bx 7300 amdahl apollo aviion bsd bull coherent convex
  85. SYSTEMS2 = cray cray_cc cyber_sgi dec dnix encore eta gcc_os2 generic
  86. SYSTEMS3 = generic2 gould hk68 hp icc_os2 minix mips msc_dos msc_os2 next
  87. SYSTEMS4 = p_iris pyramid rs6000 rtaix sco sco_dos sco_x286 sequent sgi
  88. SYSTEMS5 = stellar sun sysv tahoe ultrix vax wombat
  89.  
  90. SYS_UTIL1 = ship ship_dos ship_gcc ship_icc ship_os2 ship_sysv zi_dos
  91. SYS_UTIL2 = zi_gcc zi_icc zi_os2 zipinfo 
  92.  
  93. ####################
  94. # DEFAULT HANDLING #
  95. ####################
  96.  
  97. # The below will try to use your shell variable "SYSTEM" as the type system
  98. # to use (e.g., if you type "make" with no parameters at the command line).
  99. # The test for $(MAKE) is necessary for VAX BSD make (and Gould, apparently),
  100. # as is the "goober" (else stupid makes see an "else ;" statement, which they
  101. # don't like).  "goober" must then be made into a valid target for machines
  102. # which DO define MAKE properly (and have SYSTEM set).  Quel kluge, non?
  103. # And to top it all off, it appears that the VAX, at least, can't pick SYSTEM
  104. # out of the environment either (which, I suppose, should not be surprising).
  105. # [Btw, if the empty "goober" target causes someone else's make to barf, just
  106. # add an "@echo > /dev/null" command (or whatever).  Works OK on the Amdahl
  107. # and Crays, though.]
  108.  
  109. default:
  110.     @if test -z "$(MAKE)"; then\
  111.         if test -z "$(SYSTEM)";\
  112.         then make ERROR;\
  113.         else make $(SYSTEM) MAKE="make";\
  114.         fi;\
  115.     else\
  116.         if test -z "$(SYSTEM)";\
  117.         then $(MAKE) ERROR;\
  118.         else $(MAKE) $(SYSTEM) goober;\
  119.         fi;\
  120.     fi
  121.  
  122. goober:
  123.  
  124. ERROR:
  125.     @echo
  126.     @echo\
  127.  "  If you're not sure about the characteristics of your system, try typing"
  128.     @echo\
  129.  '  "make generic".  If the compiler barfs and says something unpleasant about'
  130.     @echo\
  131.  '  "timezone redefined," try typing "make clean" followed by "make generic2".'
  132.     @echo\
  133.  '  One of these actions should produce a working copy of unzip on most Unix'
  134.     @echo\
  135.  '  systems.  If you know a bit more about the machine on which you work, you'
  136.     @echo\
  137.  '  might try "make list" for a list of the specific systems supported herein.'
  138.     @echo\
  139.  '  And as a last resort, feel free to read the numerous comments within the'
  140.     @echo\
  141.  '  Makefile itself.  Have an excruciatingly pleasant day.'
  142.     @echo
  143.  
  144. list:
  145.     @echo
  146.     @echo\
  147.  'Type "make <system>", where <system> is one of the following:'
  148.     @echo
  149.     @echo  "    $(SYSTEMS1)"
  150.     @echo  "    $(SYSTEMS2)"
  151.     @echo  "    $(SYSTEMS3)"
  152.     @echo  "    $(SYSTEMS4)"
  153.     @echo  "    $(SYSTEMS5)"
  154.     @echo
  155.     @echo\
  156.  'Otherwise set the shell variable SYSTEM to one of these and just type "make".'
  157.     @echo\
  158.  'Targets for related utilities (ZipInfo and Ship) include:'
  159.     @echo
  160.     @echo  "    $(SYS_UTIL1)"
  161.     @echo  "    $(SYS_UTIL2)"
  162.     @echo
  163.     @echo\
  164.  'For further (very useful) information, please read the comments in Makefile.'
  165.     @echo
  166.  
  167.  
  168. ###############################################
  169. # BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES #
  170. ###############################################
  171.  
  172. .c$O :
  173.     $(CC) -c $(CFLAGS) $*.c
  174.  
  175. unzip$(EXE):    $(OBJS)
  176.     $(LD) $(LDFLAGS) $(OBJS) $(LDFLAGS2)
  177.  
  178. crypt$O:        crypt.c unzip.h zip.h    # may or may not be in distribution
  179. dosname.obj:    dosname.c        # for OS/2 only
  180. extract$O:      extract.c unzip.h
  181. file_io$O:      file_io.c unzip.h
  182. inflate$O:      inflate.c unzip.h    # may or may not be in distribution
  183. mapname$O:      mapname.c unzip.h
  184. match$O:        match.c unzip.h
  185. misc$O:         misc.c unzip.h
  186. unimplod$O:     unimplod.c unzip.h
  187. unreduce$O:     unreduce.c unzip.h
  188. unshrink$O:     unshrink.c unzip.h
  189. unzip$O:        unzip.c unzip.h
  190.  
  191. clean:
  192.     rm -f $(OBJS) unzip$(EXE)
  193.  
  194.  
  195. ################################
  196. # INDIVIDUAL MACHINE MAKERULES #
  197. ################################
  198.  
  199. # these are the makerules for various systems
  200. # TABS ARE REQUIRED FOR MANY VERSIONS OF "MAKE"!
  201.  
  202.  
  203. # ---------------------------------------------------------------------------
  204. #   Generic targets (can't assume make utility groks "$(MAKE)")
  205. # ---------------------------------------------------------------------------
  206.  
  207. generic:    unzip    # first try if unknown
  208.  
  209. generic2:        # second try if unknown:  hope make is called "make"...
  210.     make unzip CFLAGS="$(CFLAGS) -DBSD"
  211.  
  212. # ---------------------------------------------------------------------------
  213. #   "Normal" group (both big- and little-endian, structure-padding or not):
  214. # ---------------------------------------------------------------------------
  215.  
  216. 386i:        unzip    # sun386i, SunOS 4.0.2 ["sun:" works, too, but bigger]
  217. 3Bx:        unzip    # AT&T 3B2/1000-80; should work on any WE32XXX machine
  218. 7300:        unzip    # AT&T 7300 (M68000/SysV)
  219. apollo:        unzip    # Apollo Domain/OS machines
  220. aviion:         unzip    # Data General AViiONs, DG/UX 4.3x
  221. bull:        unzip    # Bull DPX/2, BOS 2.00.45 (doesn't require -Xk switch)
  222. coherent:    unzip    # Coherent 3.10, Mark Williams C
  223. cray_cc:    unzip    # Cray-2 and Y-MP, using default (possibly old) compiler
  224. dec:        unzip    # DEC 5820 (MIPS RISC), test version of Ultrix v4.0
  225. dnix:        unzip    # 680X0, DIAB dnix 5.2/5.3 (a Swedish System V clone)
  226. encore:        unzip    # Multimax
  227. eta:        unzip    # ETA-10P*, hybrid SysV with BSD 4.3 enhancements
  228. gould:        unzip    # Gould PN9000 running UTX/32 2.1Bu01
  229. hp:        unzip    # HP 9000 series (68020), 4.3BSD or HP-UX A.B3.10 Ver D
  230. hp_ux:        unzip    # (to match zip's makefile entry)
  231. mips:        unzip    # MIPS M120-5(?), SysV R3 [error in sys/param.h file?]
  232. rs6000:        unzip    # IBM RS/6000 under AIX 3
  233. rtaix:        unzip    # IBM RT 6150 under AIX 2.2.1
  234. sco:        unzip    # Xenix/386 (tested on 2.3.1); SCO Unix 3.2.0.
  235. stellar:    unzip    # gs-2000
  236. sun:        unzip    # Sun 4/110, SunOS 4.0.3c; Sun 3 (68020), SunOS 4.0.3
  237. tahoe:        unzip    # tahoe (CCI Power6/32), 4.3BSD
  238. ultrix:        unzip    # VAXen, DEC 58x0 (MIPS guts), DECstation 2100; v4.x
  239. vax:        unzip    # general-purpose VAX target (not counting VMS)
  240.  
  241. # ---------------------------------------------------------------------------
  242. #   BSD group (for timezone structs [struct timeb]):
  243. # ---------------------------------------------------------------------------
  244.  
  245. bsd:        _bsd    # generic BSD (BSD 4.2, Ultrix handled in unzip.h)
  246.  
  247. _bsd:
  248.     $(MAKE) unzip CFLAGS="$(CFLAGS) -DBSD"
  249.  
  250. # ---------------------------------------------------------------------------
  251. #   SysV group (for extern long timezone and ioctl.h instead of sgtty.h):
  252. # ---------------------------------------------------------------------------
  253.  
  254. sysv:        _sysv    # generic SysV
  255. amdahl:        _sysv    # Amdahl (IBM) mainframe, UTS (SysV) 1.2.4 and 2.0.1
  256. sgi:        _sysv    # Silicon Graphics Iris 4D, Irix SysV rel. 3.3.2
  257.  
  258. _sysv:
  259.     $(MAKE) unzip CFLAGS="$(CFLAGS) -DTERMIO"
  260.  
  261. # ---------------------------------------------------------------------------
  262. #   "Unique" group (require non-standard options):
  263. # ---------------------------------------------------------------------------
  264.  
  265. # Enclosed you'll find a context diff for the unzip41 makefile
  266. # which enhances compilation on a convex.  The previous version
  267. # probably worked great a couple of years ago, and would still do
  268. # so if one compiles in our "backward compatible" pcc mode.   The
  269. # following allows it to work better in a modern convexian environment
  270. # (define __STDC__ manually because default compilation mode has
  271. # extensions and thus doesn't do so).  [5 Mar 1992:  -D__STDC__ removed
  272. # for now because of problems with stat.h]
  273. #
  274. #    $(MAKE) unzip CFLAGS="$(CFLAGS) -D__STDC__ -DCONVEX -ext" ...
  275. convex:            # previous version was tested on C200/C400
  276.     $(MAKE) unzip CFLAGS="$(CFLAGS) -DCONVEX -ext"\
  277.      LDFLAGS="$(LDFLAGS) -ext"
  278.  
  279. # Cray-2 and Y-MP, running Unicos 5.1 or 6.0 (SysV + BSD enhancements)
  280. # and Standard (ANSI) C compiler 1.5, 2.0 or 3.0.
  281. cray:
  282.     $(MAKE) unzip CC="scc" LD="scc"
  283.  
  284. # The unzip41 build on a Cyber 910/SGI running Irix v3.3.3 was successful
  285. # with the following change to Makefile:
  286. cyber_sgi:
  287.     $(MAKE) unzip CFLAGS="$(CFLAGS) -I/usr/include/bsd"\
  288.      LDFLAGS="-lbsd $(LDFLAGS)"
  289.  
  290. # OS/2 2.0 (32-bit) with GNU C compiler (emx)
  291. gcc_os2:
  292.     $(MAKE) unzip.exe CC=gcc LD=gcc EXE=.exe\
  293.      OBJS="$(OBJS) dosname.o"\
  294.      CFLAGS="-O -DOS2 -DEMX32 $(CR) $(LOCAL_UNZIP)"\
  295.      LDFLAGS="-s" LDFLAGS2="-los2 -o unzip.exe"
  296.  
  297. # Heurikon HK68 (68010), UniPlus+ System V 5.0, Green Hills C-68000
  298. hk68:
  299.     $(MAKE) unzip CC="gcc" LD="gcc" LDFLAGS="-n $(LDFLAGS)" \
  300.     CFLAGS="-ga -X138 -DUNIX $(CR) $(LOCAL_UNZIP) -Dlocaltime=localti -Dtimezone=timezon"
  301.  
  302. # OS/2 2.0 (32-bit) with IBM C Set/2 compiler
  303. #
  304. file_io2.obj:        # compile this one module without optimization
  305.     $(CC) -c $(CFLAGS) -O- -Fofile_io2.obj file_io.c
  306.  
  307. icc_os2:
  308.     $(MAKE) -nologo unzip.exe CC=icc LD=icc EXE=.exe O=.obj\
  309.      OBJS="$(OS2_OBJS:file_io.obj=file_io2.obj)"\
  310.      CFLAGS="-Q -Sm -O -Gs -DOS2 $(CR) $(LOCAL_UNZIP)"\
  311.      LDFLAGS="-Q" LDFLAGS2="unzip.def -Fe unzip.exe"
  312.  
  313. # Minix 1.5 PC for the 386 with gcc or bcc
  314. minix:
  315.     $(MAKE) unzip CC=gcc CFLAGS="$(CFLAGS) -DMINIX"
  316.  
  317. # PCs (IBM-type), running MS-DOS, Microsoft C 6.00 and NMAKE.  Can't use the
  318. # SYSTEM environment variable; that requires processing the "default:" target,
  319. # which expands to some 200+ characters--well over DOS's 128-character limit.
  320. # "nmake msc_dos" works fine, aside from an annoying message, "temporary file
  321. # e:\ln023193 has been created."  I have no idea how to suppress this, but it
  322. # appears to be benign (comes from the link phase; the file is always deleted).
  323. # The environment variable LOCAL_UNZIP should be set to something appropriate
  324. # if your library uses other than the default floating-point routines; for 
  325. # example, SET LOCAL_UNZIP=-FPi87.  This target assumes the small-model library
  326. # and an 80286 or better.  At present, everything should still fit within the
  327. # 128-character command-line limit (barely); if not, remove the -nologo.  [GRR]
  328. #
  329. msc_dos:
  330.     $(MAKE) unzip.exe\
  331.      CFLAGS="-Ox $(CR) $(LOCAL_UNZIP) -nologo -G2" CC=cl\
  332.      LD=link EXE=.exe O=.obj LDFLAGS="/noi /nol" LDFLAGS2=",unzip;"
  333.  
  334. # The stack size for OS/2 must be increased to 0x1000, i.e. 
  335. # "-F 1000" has to be added to LDFLAGS for msc_os2. Otherwise
  336. # stack overflow occurs, which are only detected if compiled
  337. # with debugging option, i.e. not with -Gs!! Otherwise something
  338. # minor important seems to be overwritten :-)  [K. U. Rommel]
  339. #
  340. # Extra stack causes errors in GRR version ("/st:0x1000"); no problems
  341. # encountered so far without.  EXEHDR /VERBOSE reports 0a00 bytes of
  342. # extra stack already, so maybe the two versions are different... [GRR]
  343. #
  344. # $(LOCAL_UNZIP):  math libraries and/or any other personal or debugging
  345. #                  definitions:  e.g., SET LOCAL_UNZIP=-FPi87 -DDEBUG_STRUC
  346. # $(NOD):  intended to be used as   SET NOD=-link /nod:slibcep   to allow the
  347. #          use of default library names (slibce.lib) instead of protected-mode
  348. #          names (slibcep.lib), but it fails:  MSC adds its own /nod qualifier,
  349. #          and there seems to be no way to override this.  Typical...
  350. #
  351. #msc_os2:        # old Newtware version (may not work)
  352. #    $(MAKE) -nologo unzip.exe CC=cl LD=link EXE=.exe O=.obj\
  353. #      OBJS="$(OBJS) dosname.obj"\
  354. #      CFLAGS="-nologo -Ox -G2s -DOS2 $(CR) $(LOCAL_UNZIP) -Lp"\
  355. #      LDFLAGS="/noi /nol" LDFLAGS2=",unzip,,,unzip.def"
  356. #    bind -nologo unzip.exe -n DOSSETPATHINFO
  357. msc_os2:        # Kai Uwe Rommel version
  358.     $(MAKE) -nologo unzip.exe CC=cl LD=cl EXE=.exe O=.obj\
  359.      OBJS="$(OS2_OBJS)"\
  360.      CFLAGS="-nologo -Ox -G2s -DOS2 $(CR) $(LOCAL_UNZIP)"\
  361.      LDFLAGS="-nologo $(LOCAL_UNZIP) -Lp -F 1000"\
  362.      LDFLAGS2="unzip.def -o unzip.exe $(NOD)"
  363.     bind -nologo unzip.exe -n DOSSETPATHINFO
  364.  
  365. # NeXT 2.x: make the executable smaller.
  366. next:            # 68030 BSD 4.3+Mach
  367.     $(MAKE) unzip LDFLAGS2="-object -s"
  368.  
  369. # I successfully compiled and tested the unzip program (v30) for the
  370. # Silicon Graphics environment (Personal Iris 4D20/G with IRIX v3.2.2)
  371. p_iris:            # Silicon Graphics Personal Iris 4D20
  372.     $(MAKE) unzip CFLAGS="$(CFLAGS) -I/usr/include/bsd -DBSD"\
  373.      LDFLAGS="-lbsd $(LDFLAGS)"
  374.  
  375. # I have finished porting unzip 3.0 to the Pyramid 90X under OSX4.1.
  376. # The biggest problem was the default structure alignment yielding two
  377. # extra bytes.  The compiler has the -q option to pack structures, and
  378. # this was all that was needed.  To avoid needing ZMEMS we could compile in
  379. # the att universe, but it runs slower!
  380. #
  381. pyramid:    # Pyramid 90X, probably all, under >= OSx4.1, BSD universe
  382.     make unzip CFLAGS="$(CFLAGS) -q -DBSD -DZMEM"
  383.  
  384. # SCO cross compile from unix to DOS. Tested with Xenix/386 and
  385. # OpenDeskTop. Should work with xenix/286 as well. (davidsen)
  386. # Note that you *must* remove the unix objects and executable
  387. # before doing this!
  388. #
  389. sco_dos:
  390.     $(MAKE) unzip CFLAGS="-O $(CR) $(LOCAL_UNZIP) -dos -M0" LDFLAGS="-dos"\
  391.      LDFLAGS2="-o unzip.exe"
  392.  
  393. # SCO Xenix/286 2.2.1
  394. sco_x286:
  395.     $(MAKE) unzip CFLAGS="$(CFLAGS) -Ml2" LDFLAGS="$(LDFLAGS) -Ml2"
  396.  
  397. # Sequent Symmetry is a 386 but needs -DZMEM
  398. # This should also work on Balance but I can't test it just yet.
  399. sequent:    # Sequent w/Dynix
  400.     $(MAKE) unzip CFLAGS="$(CFLAGS) -DBSD -DZMEM"
  401.  
  402. # I didn't do this.  I swear.  No, really.
  403. wombat:        # Wombat 68000 (or whatever)
  404.     @echo
  405.     @echo  '    Ha ha!  Just kidding.'
  406.     @echo
  407.  
  408.  
  409. ##################
  410. # SHIP MAKERULES #
  411. ##################
  412.  
  413. # Ship section:  ship comes with the Zip distribution and is more properly
  414. # supported there.  But the following targets should at least get you started
  415. # if for some reason you're only interested in UnZip.  The comments near the
  416. # top of ship.c explain how to use it, and a little further poking around
  417. # should clear up any problems related to things which should be defined but
  418. # aren't, or which shouldn't be defined but are.  As with ZipInfo below, we
  419. # assume *some* competence...
  420.  
  421. _ship:    ship.c $(DEF)
  422.     $(CC) $(CFLAGS) ship.c $(DEF) $(LDFLAGS2)
  423.  
  424. ship:            # most BSD-type systems, by default
  425.     $(MAKE) _ship LDFLAGS2="-s -o ship"
  426.  
  427. ship_sysv:        # not tested; DIRENT used only to determine mailer
  428.     $(MAKE) _ship CFLAGS="$(CFLAGS) -DDIRENT" LDFLAGS2="-s -o ship"
  429.  
  430. ship_dos:        # not tested
  431.     $(MAKE) -nologo _ship CC=cl EXE=.exe\
  432.      CFLAGS="-nologo -Ox $(LOCAL_UNZIP) -G2s -F 2000"\
  433.      LDFLAGS2="-o ship.exe"
  434.  
  435. ship_os2:        # MSC 6.0, 16-bit OS/2
  436.     $(MAKE) -nologo _ship CC=cl EXE=.exe DEF=ship.def\
  437.      CFLAGS="-nologo -Ox $(LOCAL_UNZIP) -G2s -DOS2 -Lp -F 2000"\
  438.      LDFLAGS2="-o ship.exe"
  439.     bind -nologo ship.exe
  440.  
  441. ship_icc:        # IBM C Set/2, 32-bit OS/2
  442.     $(MAKE) -nologo _ship CC=icc EXE=.exe DEF=ship.def\
  443.      CFLAGS="-Q -Sm -O $(LOCAL_UNZIP) -Gs -DOS2"\
  444.      LDFLAGS2="-Fe ship.exe"
  445.  
  446. ship_gcc:        # GNU gcc / emx, 32-bit OS/2
  447.     $(MAKE) _ship CC=gcc LD=gcc EXE=.exe\
  448.      CFLAGS="-O -DOS2" LDFLAGS2="-s -o ship.exe"
  449.  
  450.  
  451. #####################
  452. # ZIPINFO MAKERULES #
  453. #####################
  454.  
  455. # Zipinfo section:  it is assumed here that anyone competent enough to
  456. # wonder about the internal guts of a zipfile is probably also competent
  457. # enough to compile the program without a lot of hand-holding.  If not...
  458. # oh well. :-)
  459.  
  460. zipinfo$O:    zipinfo.c unzip.h
  461.     $(CC) -c $(CFLAGS) $(ZC) zipinfo.c
  462.  
  463. misc_$O:    misc.c unzip.h
  464.     $(MV) misc.c misc_.c
  465.     $(CC) -c $(CFLAGS) $(ZC) -DZIPINFO misc_.c
  466.     $(MV) misc_.c misc.c
  467.  
  468. zipinfo$(EXE):    $(ZI_OBJS)
  469.     $(LD) $(ZL) $(ZI_OBJS) $(ZL2)
  470.  
  471. zi_dos:
  472.     $(MAKE) zipinfo.exe CFLAGS="-Ox -nologo $(LOCAL_UNZIP) -G2" CC=cl\
  473.      LD=link EXE=.exe O=.obj ZL="/noi /nol" ZL2=",zipinfo;" ZC="" MV="ren"
  474.  
  475. #zi_os2:         # GRR (Newtware) version (do not delete!)
  476. #    $(MAKE) -nologo zipinfo.exe CC=cl LD=link EXE=.exe O=.obj\
  477. #     CFLAGS="-nologo -Ox $(LOCAL_UNZIP) -G2s -DOS2 -Lp" ZC="" MV="ren"\
  478. #     ZL="/nol /noi" ZL2=",zipinfo,,,zipinfo.def"
  479. #    bind -nologo zipinfo.exe
  480. zi_os2:         # Kai Uwe Rommel version (do not delete!)
  481.     $(MAKE) -nologo zipinfo.exe CC=cl LD=cl EXE=.exe O=.obj\
  482.      CFLAGS="-nologo -Ox $(LOCAL_UNZIP) -G2s -DOS2" ZC="" MV="ren"\
  483.      ZL="-nologo $(LOCAL_UNZIP) -Lp -Fb" ZL2="zipinfo.def -o zipinfo.exe"
  484.  
  485. zi_icc:            # IBM C Set/2, 32-bit OS/2
  486.     $(MAKE) -nologo zipinfo.exe CC=icc LD=icc EXE=.exe O=.obj\
  487.      CFLAGS="-Q -Sm -O -Gs -DOS2" ZC="" MV="ren"\
  488.      ZL="-Q" ZL2="zipinfo.def -Fe zipinfo.exe"
  489.  
  490. zi_gcc:            # GNU gcc / emx, 32-bit OS/2
  491.     $(MAKE) zipinfo.exe CC=gcc LD=gcc EXE=.exe\
  492.      CFLAGS="-O -DOS2 -DEMX32" ZC="" MV="ren"\
  493.      ZL="-s" ZL2="-o zipinfo.exe"
  494.  
  495.  
  496. ################
  497. # ATTRIBUTIONS #
  498. ################
  499.  
  500. # Thanks to the following people for their help in testing and/or porting
  501. # to various machines (and thanks to the many others who aren't listed
  502. # here but should be):
  503. #
  504. #  (original Unix port:  Carl Mascott <cmascott@world.std.com>)
  505. #  386i:    Richard Stephen <stephen@corp.telecom.co.nz>
  506. #  3Bx:        Bob Kemp <hrrca!bobc@cbnewse.att.com>
  507. #  7300:    Richard H. Gumpertz <rhg@cpsolv.CPS.COM>
  508. #        Greg Roelofs <roelofs@amelia.nas.nasa.gov>
  509. #  amdahl:    Kim DeVaughn <ked01@juts.ccc.amdahl.com>, Greg Roelofs
  510. #  apollo:    Tim Geibelhaus
  511. #  aviion:    Bruce Kahn <bkahn@archive.webo.dg.com>
  512. #  bull:    Matt D'Errico <doc@magna.com>
  513. #  coherent:    David Fenyes <dfenyes@thesis1.med.uth.tmc.edu>
  514. #  convex:    Randy Wright <rwright@convex.com>
  515. #  cray:    Greg Roelofs, Paul Borman <prb@cray.com>
  516. #  cyber_sgi:    Clint Pulley <u001@cs910.cciw.ca>
  517. #  dec:        "Moby" Dick O'Connor <djo7613@u.washington.edu>
  518. #  dnix:    Bo Kullmar <bk@kullmar.se>
  519. #  eta:        Greg Flint <afc@klaatu.cc.purdue.edu>
  520. #  gould:    Onno van der Linden <linden@fwi.uva.nl>
  521. #  hk68:    John Limpert <gronk!johnl@uunet.UU.NET>
  522. #  hp:        Randy McCaskile <rmccask@seas.gwu.edu> (HP-UX)
  523. #        Gershon Elber <gershon@cs.utah.edu> (HP BSD 4.3)
  524. #  icc_os2:    Kai Uwe Rommel <rommel@informatik.tu-muenchen.de>
  525. #  minix:    Kai Uwe Rommel (Minix 1.5)
  526. #  mips:    Peter Jones <jones@mips1.uqam.ca>
  527. #  msc_dos:    Greg Roelofs
  528. #  msc_os2:    Wim Bonner <wbonner@yoda.eecs.wsu.edu>
  529. #        Kai Uwe Rommel, Greg Roelofs
  530. #  next:    Mark Adler <madler@piglet.caltech.edu>
  531. #  p_iris:    Valter V. Cavecchia <root@itnsg1.cineca.it>
  532. #  pyramid:    James Dugal <jpd@usl.edu>
  533. #  rs6000:    Filip Gieszczykiewicz <fmg@smi.med.pitt.edu>
  534. #  rtaix:    Erik-Jan Vens
  535. #  sco:        Onno van der Linden (SCO Unix 3.2.0)
  536. #           Bill Davidsen <davidsen@crdos1.crd.ge.com> (Xenix/386)
  537. #  sco_dos:    Bill Davidsen
  538. #  sco_x286:    Ricky Mobley <ddi1!lrark!rick@uunet.UU.NET>
  539. #  sequent:    Phil Howard <phil@ux1.cso.uiuc.edu>
  540. #  sgi:        Greg Roelofs (Iris 4D/380?)
  541. #  sun:        Onno van der Linden (Sun 4), Greg Roelofs (Sun 3, 4)
  542. #  tahoe:    Mark Edwards <mce%sdcc10@ucsd.edu>
  543. #  ultrix:    Greg Flint (VAX)
  544. #        Michael Graff <explorer@iastate.edu> (DECstation 2100?)
  545. #        Greg Roelofs (DEC 5810)
  546. #        Alex A Sergejew <aas@brain.wph.uq.oz.au>
  547. #  vax:        Forrest Gehrke <feg@dodger.att.com> (SysV)
  548. #        David Kirschbaum <kirsch@usasoc.soc.mil> (BSD 4.3)
  549. #        Jim Steiner <steiner@pica.army.mil> (8600+Ultrix)
  550. #  wombat:    Joe Isuzu <joe@trustme.isuzu.com>
  551. #  zi_dos:    Greg Roelofs
  552. #  zi_icc:    Kai Uwe Rommel
  553. #  zi_os2:    Greg Roelofs, Kai Uwe Rommel
  554. #  zipinfo:    Greg Roelofs
  555.